package client;

import enums.Prop;

public class PropManager {
	private int coins;
	private boolean hasC;
	private boolean hasD;
	private boolean hasE;
	public int getCoins() {
		return coins;
	}
	public void setCoins(int coins) {
		this.coins = coins;
	}
	public boolean isHasC() {
		return hasC;
	}
	public void setHasC(boolean hasC) {
		this.hasC = hasC;
	}
	public boolean isHasD() {
		return hasD;
	}
	public void setHasD(boolean hasD) {
		this.hasD = hasD;
	}
	public boolean isHasE() {
		return hasE;
	}
	public void setHasE(boolean hasE) {
		this.hasE = hasE;
	}
	public void chooseProp(Prop p){
		switch (p) {
		case C:
			hasC=true;
			this.coins-=p.getPrice();
			break;
		case D:
			hasD=true;
			this.coins-=p.getPrice();
			break;
		case E:
			hasE=true;
			this.coins-=p.getPrice();
			break;
		default:
			break;
		}
	}
	public void noChooseProp(Prop p){
		switch (p) {
		case C:
			hasC=false;
			this.coins+=p.getPrice();
			break;
		case D:
			hasD=false;
			this.coins+=p.getPrice();
			break;
		case E:
			hasE=false;
			this.coins+=p.getPrice();
			break;
		default:
			break;
		}
	}
	
}
